import request from '@/config/axios'


export const labelApi = {
  // 创建商品标签
  createLabel: async (data: any) => {
    return await request.post({ url: `/shops/labels/create`, data})
  },
  // 更新商品标签
  updateLabel: async (data: any) => {
    return await request.put({ url: `/shops/labels/update`, data})
  },
  // 获取标签分页
  getLabelPage: async ( params:any) => {
    return await request.get({ url: `/shops/labels/page`, params})
  },
  // 获取标签
  getLabel: async (params: any) => {
    return await request.get({ url: `/shops/labels/get`, params})
  },
  // 删除标签
  deleteLabel: async (id:number) =>{
    return await request.delete({ url: `/shops/labels/delete?id=` + id})
  }
}